Skip to content

Conversation

ondrejmirtes
Copy link
Member

The current implementation (#264) has some drawbacks:

  • Printing with preserving format is pretty broken. For example, it does not notice when a comment is removed from a node.
  • The comment indexes are wrong, they are often out of bounds of the associated node. For example startIndex of node is 5, but its comment can start earlier, which causes problems in Printer
  • Comments are often associated with a weird node, for example:
array{
	// a is for apple
	a: int,
}

Associates the comment with the item keyName, not item itself.

This PR tries to fix it but absence of these fixes doesn't prevent us from releasing phpdoc-parser 2.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant